import request from "@/utils/request";

// 查询制造商列表
export function listManufacturers(query) {
  return request({
    url: "/admin/assets/manufacturers/",
    method: "get",
    params: query
  });
}

// 查询制造商详细
export function getManufacturers(id) {
  return request({
    url: "/admin/assets/manufacturers/" + id + "/",
    method: "get"
  });
}

// 新增制造商
export function addManufacturers(data) {
  return request({
    url: "/admin/assets/manufacturers/",
    method: "post",
    data: data
  });
}

// 修改制造商
export function updateManufacturers(data) {
  return request({
    url: "/admin/assets/manufacturers/" + data.id + "/",
    method: "put",
    data: data
  });
}

// 删除制造商
export function delManufacturers(id) {
  return request({
    url: "/admin/assets/manufacturers/" + id + "/",
    method: "delete"
  });
}

// 导出制造商
export function exportManufacturers(query) {
  return request({
    url: "/admin/assets/manufacturers/export/",
    method: "get",
    params: query
  });
}

export function importsManufacturers(data) {
  return request({
    url: "/admin/assets/manufacturers/import/",
    method: "post",
    data: data
  });
}
